<{include file="common/header" /}>
<script src="__JS__/pintuer.js"></script>
</head>
<body>
<div class="panel admin-panel">
  <div class="panel-head"><strong class="icon-reorder"> 内容列表</strong></div>
  <div class="padding border-bottom">
    <button type="button" class="button border-yellow" onclick="window.location.href='#add'"><span class="icon-plus-square-o"></span> 添加分类</button>
  </div>
  <table class="table table-hover text-center">
    <tr>
      <th width="10%">ID</th>
      <th width="20%">权限名称</th>
      <th width="20%">地址表达式</th>
      <th width="15%">显示</th>
      <th width="15%">有效</th>
      <th width="310">操作</th>
    </tr>
    <{foreach $list as $v}>
    <tr>
      <td><{$v['id']}></td>
      <td><{$v['title']}></td>
      <td><{$v['name']}></td>
      <td><{$v->if_show_img|raw}></td>
      <td><{$v->status_img|raw}></td>
      <td>
        <div class="button-group"><a class="button border-main" href="<{:url('editMenu',['id'=>$v['id']])}>"><span class="icon-edit"></span> 修改</a>
          <a class="button border-red" href="javascript:void(0)" onclick="return del(<{$v['id']}>,2)"><span class="icon-trash-o"></span> 删除</a>
        </div>
      </td>
    </tr>
    <{/foreach}>
    <!--<tr>-->
      <!--<td>7</td>-->
      <!--<td>新闻管理员</td>-->
      <!--<td>2019-7-3</td>-->
      <!--<td>-->
        <!--<div class="button-group"><a class="button border-main" href="cateedit.php?id=7"><span class="icon-edit"></span> 修改</a>-->
          <!--<a class="button border-red" href="cate.php?id=7&action=del"><span class="icon-trash-o"></span> 删除</a>-->
        <!--</div>-->
      <!--</td>-->
    <!--</tr>-->
    <!--<tr>-->
      <!--<td>6</td>-->
     <!--<td>产品管理员</td>-->
      <!--<td>2019-7-3</td>-->
      <!--<td>-->
        <!--<div class="button-group"><a class="button border-main" href="cateedit.php?id=6"><span class="icon-edit"></span> 修改</a>-->
          <!--<a class="button border-red" href="cate.php?id=6&action=del"><span class="icon-trash-o"></span> 删除</a>-->
        <!--</div>-->
      <!--</td>-->
    <!--</tr>-->
    <!--<tr>-->
      <!--<td colspan="4"><div class="pagelist"> <a href="">上一页</a> <span class="current">1</span><a href="">2</a><a href="">3</a><a href="">下一页</a><a href="">尾页</a> </div></td>-->
    <!--</tr>-->
  </table>
</div>
<script type="text/javascript">
    function del(id,mid){
        if(confirm("您确定要删除吗?")){
            location.href='delMenu?id='+id;

        }
    }
</script>
<div class="panel admin-panel margin-top">
  <div class="panel-head" id="add"><strong><span class="icon-pencil-square-o"></span>添加内容</strong></div>
  <div class="body-content">
    <form method="post" class="form-x" action="<{:url('addMenu')}>">
      <div class="form-group">
        <div class="label">
          <label>上级权限：</label>
        </div>
        <div class="field">
          <select name="pid" class="input w50">
            <option value="0">默认加入当前权限同级</option>
            <{foreach $list as $v}>
            <option value="<{$v['id']}>"><{$v['title']}></option>
            <{/foreach}>
            </option>
          </select>
          <div class="tips"></div>
        </div>
      </div>
      <div class="form-group">
        <div class="label">
          <label>权限名称：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" name="title" />
          <div class="tips"></div>
        </div>
      </div>
      <div class="form-group">
        <div class="label">
          <label>地址表达式：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" name="name" />
          <div class="tips"></div>
        </div>
      </div>
      <div class="form-group">
        <div class="label">
          <label>其他属性：</label>
        </div>
        <div class="field" style="padding-top:8px;">
          有效  <input   type="radio" name="status"  value="1" checked/>
          无效<input   type="radio" name="status"  value="0" />
          显示 <input   type="radio"  name="if_show" value="1"/>
          不显示 <input   type="radio"  name="if_show" value="0" checked/>
        </div>
      </div>
      <div class="form-group">
        <div class="label">
          <label></label>
        </div>
        <div class="field">
          <button class="button bg-main icon-check-square-o" type="submit"> 提交</button>
        </div>
      </div>
    </form>
  </div>
</div>
</body>
</html>